import { createRouter, createWebHashHistory } from 'vue-router'
import Administration from "@/views/administration.vue";
import StudentView from "@/views/StudentView.vue";
import teacher from "@/views/teacher.vue";
import course from "@/views/course.vue";
import grade from "@/views/grade.vue";

const routes = [
  {
    path: '/',  //路径  /代表首页
    name: 'administration',  //名称
    component: Administration,
    children:[{
      path: '/student',  //路径  /代表首页
      name: 'student',  //名称
      component:StudentView //组件
    },
      {
        path: '/teacher',  //路径  /代表首页
        name: 'teacher',  //名称
        component:teacher,
      },{
        path: '/course',  //路径  /代表首页
        name: 'course',  //名称
        component:course,
      },{
        path: '/grade',  //路径  /代表首页
        name: 'grade',  //名称
        component:grade,
      }]
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
